<HTML>
<HEAD>
<meta charset="UTF-8">
<title>CardBrand.fromCardNumber - stripe</title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">stripe</a>&nbsp;/&nbsp;<a href="../index.html">com.stripe.android.model</a>&nbsp;/&nbsp;<a href="index.html">CardBrand</a>&nbsp;/&nbsp;<a href="./from-card-number.html">fromCardNumber</a><br/>
<br/>
<h1>fromCardNumber</h1>
<a name="com.stripe.android.model.CardBrand.Companion$fromCardNumber(kotlin.String)"></a>
<code><span class="keyword">fun </span><span class="identifier">fromCardNumber</span><span class="symbol">(</span><span class="identifier" id="com.stripe.android.model.CardBrand.Companion$fromCardNumber(kotlin.String)/cardNumber">cardNumber</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">?</span><span class="symbol">)</span><span class="symbol">: </span><a href="index.html"><span class="identifier">CardBrand</span></a></code>
<h3>Parameters</h3>
<p><a name="cardNumber"></a>
<code>cardNumber</code> - a card number</p>
<p><strong>Return</strong><br/>
the <a href="index.html">CardBrand</a> that matches the <a href="from-card-number.html#com.stripe.android.model.CardBrand.Companion$fromCardNumber(kotlin.String)/cardNumber">cardNumber</a>'s prefix, if one is found;
otherwise, <a href="-unknown.html">CardBrand.Unknown</a></p>
</BODY>
</HTML>
